/*Diego Lima de Freitas RA: 317632
 *Yuri Souza Padua RA: 317420
 * 
 * Classe que trata as variáveis de expressões
 */

package AST;

public class VariableExpr extends Expr {

    protected VarDec v;

    public VariableExpr(VarDec v) {
        this.v = v;
    }

    @Override
    public void genC(PW pw, boolean putParenthesis) {
        pw.out.print(v.getName());
    }

    @Override
    public Type getType() {
        return v.getType();
    }
}
